import request from '@/utils/request'

// 查询出差申请列表
export function listBusiness(query) {
  return request({
    url: '/attendance/business/list',
    method: 'get',
    params: query
  })
}

// 查询出差申请详细
export function getBusiness(tripId) {
  return request({
    url: '/attendance/business/' + tripId,
    method: 'get'
  })
}

// 新增出差申请
export function addBusiness(data) {
  return request({
    url: '/attendance/business',
    method: 'post',
    data: data
  })
}

// 修改出差申请
export function updateBusiness(data) {
  return request({
    url: '/attendance/business',
    method: 'put',
    data: data
  })
}

// 删除出差申请
export function delBusiness(tripId) {
  return request({
    url: '/attendance/business/' + tripId,
    method: 'delete'
  })
}
